CXX = g++
INC=-I.
#GCOV=-fprofile-arcs -ftest-coverage
CFLAGS  = -g $(INC) $(GCOV)
LIBS = -lpthread
CURRENT = $(shell pwd)
LIST    = $(subst /, ,$(CURRENT))
TARGET  = $(word $(words ${LIST}), ${LIST})

SRCS = $(shell ls *.cpp)
HDRS = $(shell ls *.h)

OBJS = $(SRCS:.cpp=.o)

.cpp.o: 
	$(CXX) $(CFLAGS) -c $<

$(TARGET): $(OBJS)
	$(CXX) $(CFLAGS) -o $(TARGET) $(OBJS) $(LIBS)
clean:
	rm $(OBJS) $(TARGET)
